<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>九九乘法表</title>
		<script>
		  
		function fun(){
			document.write("<table>");
			for(var i=1;i<=9;i++){
				document.write("<br>");
				document.write("<tr>");
				for(var j=1;j<=i;j++){
					document.write("<td style='border: black 1px solid;'>");
					document.write(i+"*"+j+"="+i*j);
					document.write("</td>");
				}
				document.write("</tr>");
				
			}
			document.write("</table>");
			document.write("<style>td{background-color: red;}</style>");
		}
		</script>
	</head>
	<body>
		<button onclick="fun()">显示</button>
	
	</body>
</html>
